
#include "../include/sqlftp.h"
int sqlInit(MYSQL **ppMysql)
{
    *ppMysql = mysql_init(NULL);//初始化
    if(!*ppMysql){
        printf("Sql Init Fail\n");
        exit(-1);
    } 
    //连接
    MYSQL *conret = mysql_real_connect(*ppMysql, SQLHOST, SQLUSER, SQLPWD, SQLDB, 3603, NULL, 0);
    if(!conret){
        printf("Sql Conn Fail :%s\n",mysql_error(conret));
        exit(-1);
    }
    printf("Sql Init Success\n");
    return 0;
}
